package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import cn.wolfcode.crm.util.PageResult;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface IEmployeeService {

    void saveOrUpdate(Employee entity);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();


    void changState(Long id);

    PageResult quey4List(EmployeeQueryObject qo);

    void resetpassword(Employee entity);

    Employee getEmployeeByUsername(String username);

    void importXls(MultipartFile file, HttpServletResponse response) throws Exception;

    //获取导入模板
    Workbook getImportXlsMode();
    /**
     * 根据qo条件在实现类中将xls查询返回
     * @param qo
     * @return
     */
    Workbook exportXls(EmployeeQueryObject qo);
}
